<%@page import="java.util.*"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
	//返回locale 已包含的语言环境数组
	Locale[] locales = Locale.getAvailableLocales();
	for(Locale l:locales){
		//返回该语言环境下的国家或地区名及代码
		out.print("国家"+l.getDisplayCountry()+":"+l.getCountry()+"<br>");
		//返回该语言环境的语言名及语言代码
		out.print("语言"+l.getDisplayLanguage()+":"+l.getLanguage()+"<br>");
	}
	out.print("<br><hr><br>");
	//1、引用哪种语言
	Locale locale = Locale.US;
	//2、引用哪组多语言文件
	ResourceBundle rb = ResourceBundle.getBundle("message",locale);
	//3、引用哪条信息
	out.print(rb.getString("welcome"));
%>
</body>
</html>